const state = {
    //报案人信息
    reportuser: {
        REPORTINFORMATION_ID: "",
        REPORTINFORMATION_IDENTITY: "",
        REPORTINFORMATION_RELATION: "",
        REPORTINFORMATION_USERNAME: "",
        REPORTINFORMATION_TIME: "",
        REPORTINFORMATION_WAY: "",
        REPORTINFORMATION_TEL: "",
        REPORTINFORMATION_EMAIL: "",
        REPORTINFORMATION_STATE: "", //报案状态，需审核，需修改，可查看，
        REPORTINFORMATION_ISMEDICAL: "", //是否包含医疗保险   
        REPORTINFORMATION_CAUSE: "",
        REPORTINFORMATION_IDENTITYWHY: "",
        REPORTINFORMATION_CHECKPEOPLE: '', //审核人员
        REPORTINFORMATION_ADDPEOPLE: '',
        type: []
    },
    rules: {
        REPORTINFORMATION_IDENTITY: [{
            required: true,
            message: '您还没有选择',
            trigger: 'change'
        }],
        REPORTINFORMATION_RELATION: [{
            required: true,
            message: '请选择一项',
            trigger: 'blur'
        }],
        REPORTINFORMATION_USERNAME: [{
            required: true,
            message: '此项不能为空',
            trigger: 'blur'
        }],
        REPORTINFORMATION_TIME: [{
            required: true,
            message: '此项不能为空',
            trigger: 'blur'
        }],
        REPORTINFORMATION_WAY: [{
            required: true,
            message: '请选择一项',
            trigger: 'blur'
        }],
        REPORTINFORMATION_TEL: [{
            required: true,
            message: '此项不能为空',
            trigger: 'blur'
        }],
        REPORTINFORMATION_EMAIL: [{
            required: true,
            message: '此项不能为空',
            trigger: 'blur'
        }],
        REPORTINFORMATION_CAUSE: [{
            required: true,
            message: '此项不能为空',
            trigger: 'blur'
        }],
        type: [{
                type: 'array',
                required: true,
                message: '请选择一项',
                trigger: 'blur'
            }]
            // RI_MEDICAL_ADDRESS2: [{
            //     required: true,
            //     message: '此项不能为空',
            //     trigger: 'blur'
            // }],
    },
    //fromlist 报案类型数组
    fromlist: [],
    medical: {
        RI_MEDICAL_ID: "",
        RI_MEDICAL_ADDRESS: [],
        RI_MEDICAL_DETAIS: '',
        RI_MEDICAL_HTYPE: '',
        RI_MEDICAL_HLNAME: '',
        RI_MEDICAL_STATE: '',
        REPORTINFORMATION_ID: '',
        RI_MEDICAL_WHY: '',
        RI_MEDICAL_CHANGETIME: "",
        RI_MEDICAL_DADDRESS: "",
        RI_MEDICAL_TIME: ""


    },
    harmDisabilityrules: {
        RI_INJURE_TIME: [{
            required: true,
            message: '此项不能为空',
            trigger: 'blur'
        }],
        RI_INJURE_HTIME: [{
            required: true,
            message: '此项不能为空',
            trigger: 'blur'
        }],
        RI_INJURE_ADDRESS: [{
            type: 'array',
            required: true,
            message: '请选择一项',
            trigger: 'blur'
        }],
        RI_INJURE_ADDRESSDETAIL: [{
            required: true,
            message: '此项不能为空',
            trigger: 'blur'
        }],
        RI_INJURE_DETAIL: [{
            required: true,
            message: '此项不能为空',
            trigger: 'blur'
        }]

    },
    harmDierules: {
        RI_DIED_TIME: [{
            type: 'date',
            required: true,
            message: '此项不能为空',
            trigger: 'blur'
        }],
        RI_DIED_HTIME: [{
            required: true,
            message: '此项不能为空',
            trigger: 'blur'
        }],
        RI_DIED_ADDRESS: [{
            type: 'array',
            required: true,
            message: '请选择一项',
            trigger: 'blur'
        }],
        RI_DIED_ADDRESSDETAIL: [{
            required: true,
            message: '此项不能为空',
            trigger: 'blur'
        }],
        RI_DIED_DETAIL: [{
            required: true,
            message: '此项不能为空',
            trigger: 'blur'
        }]


    },
    medicalrules: {
        RI_MEDICAL_ADDRESS: [{
            type: 'array',
            required: true,
            message: '请选择一项',
            trigger: 'blur'
        }],
        RI_MEDICAL_DETAIS: [{
            required: true,
            message: '此项不能为空',
            trigger: 'blur'
        }],
        RI_MEDICAL_DADDRESS: [{
            required: true,
            message: '此项不能为空',
            trigger: 'blur'
        }],
        RI_MEDICAL_HTYPE: [{
            required: true,
            message: '您还没有选择',
            trigger: 'change'
        }],
        RI_MEDICAL_HLNAME: [{
            required: true,
            message: '此项不能为空',
            trigger: 'blur'
        }],
        RI_MEDICAL_TIME: [{
            type: 'date',
            required: true,
            message: '此项不能为空',
            trigger: 'blur'
        }]

    },
    reporttype1: [{
            "value": "medical",
            "label": "医疗保险责任",
            "children": [{
                "value": "medical",
                "label": "医疗保险责任"
            }]
        },
        {
            "value": "harm",
            "label": "意外伤害保险责任",
            "children": [{
                    "value": "harmDie",
                    "label": "意外身故"
                },
                {
                    "value": "harmDisability",
                    "label": "意外伤残"
                }
            ]
        },
        {
            "value": "rescue",
            "label": "全球紧急救援保险责任",
            "children": [{
                    "value": "rescueMeidca",
                    "label": "紧急医疗救援"
                },
                {
                    "value": "rescueMove",
                    "label": "紧急转院"
                },
                {
                    "value": "rescueReturned",
                    "label": "紧急运返"
                },
                {
                    "value": "rescueAccompany",
                    "label": "紧急转院/运返陪同"

                },
                {
                    "value": "rescueVisit",
                    "label": "家属境外慰问探访"

                },
                {
                    "value": "rescueInter",
                    "label": "遗体运返/安葬"

                }
            ]
        },
        {
            "value": "studyBreak",
            "label": "学业中断保险责任",
            "children": [{
                "value": "studyBreak",
                "label": "学业中断保险责任"
            }]
        },
        {
            "value": "travel",
            "label": "旅行不便保险责任",
            "children": [{
                    "value": "travelDelay",
                    "label": "旅行延误"
                },
                {
                    "value": "travelLose",
                    "label": "物品丢失"
                }
            ]
        },
        {
            "value": "three",
            "label": "个人第三者责任保险责任",
            "children": [{
                "value": "three",
                "label": "个人第三者责任保险责任"
            }]
        }
    ],
    reporttype2: [{
            "value": "medical",
            "label": "医疗保险责任",
            "children": [{
                "value": "medical",
                "label": "医疗保险责任"
            }]
        },
        {
            "value": "harm",
            "label": "意外伤害保险责任",
            "children": [{
                    "value": "harmDie",
                    "label": "意外身故"
                },
                {
                    "value": "harmDisability",
                    "label": "意外伤残"
                }
            ]
        }
    ],
    reporttype3: [{
        "value": "medical",
        "label": "医疗保险责任",
        "children": [{
            "value": "medical",
            "label": "医疗保险责任"
        }]
    }],
    //医疗报案信息

};
const mutations = {
    changer(state, result) {
        // 变更状态

        state.reportuser.REPORTINFORMATION_ID = "",
            state.reportuser.REPORTINFORMATION_IDENTITY = "客户报案",
            state.reportuser.REPORTINFORMATION_RELATION = "",
            state.reportuser.REPORTINFORMATION_USERNAME = "",
            state.reportuser.REPORTINFORMATION_TIME = "",
            state.reportuser.REPORTINFORMATION_WAY = "",
            state.reportuser.REPORTINFORMATION_TEL = "",
            state.reportuser.REPORTINFORMATION_EMAIL = "",
            state.reportuser.REPORTINFORMATION_STATE = "", //报案状态，需审核，需修改，可查看，
            state.reportuser.REPORTINFORMATION_ISMEDICAL = "", //是否包含医疗保险
            state.reportuser.REPORTINFORMATION_CAUSE = "",
            state.reportuser.REPORTINFORMATION_IDENTITYWHY = "",
            state.reportuser.type = []


    },
    medicalchanger(state, result) {
        state.RI_MEDICAL_ID = result.RI_MEDICAL_ID,
            state.RI_MEDICAL_ADDRESS = result.RI_MEDICAL_ADDRESS,
            state.RI_MEDICAL_DETAIS = result.RI_MEDICAL_DETAIS,
            state.RI_MEDICAL_HTYPE = result.RI_MEDICAL_HTYPE,
            state.RI_MEDICAL_HLNAME = result.RI_MEDICAL_HLNAME,
            state.RI_MEDICAL_STAT = result.RI_MEDICAL_STAT,
            state.REPORTINFORMATION_ID = result.REPORTINFORMATION_ID,
            state.RI_MEDICAL_WHY = result.RI_MEDICAL_WHY,
            state.RI_MEDICAL_CHANGETIME = result.RI_MEDICAL_CHANGETIME,
            state.RI_MEDICAL_DADDRESS = result.RI_MEDICAL_DADDRESS
    },
    fromlistEmpty(state, result) {
        state.fromlist = result;
    }
}
export default {
    state,
    mutations
}